import { request } from "../../utils/request.js"

// 类别分类
export const getCategoryList = (params) => {
	return request({
		url: '/category/list',
		method: 'GET',
		params
	})
}

// 类别下面的商品
export const productDataListByCategoryId = (params) => {
	return request({
		url: '/product/list',
		method: 'GET',
		params
	})
}


// 添加商品到购物车
export const addShoppingCart = (params) => {
	return request({
		url: '/shopping/cart/add',
		method: 'POST',
		params
	})
}

// 按名字查询
export const getProductByName = (params) => {
	return request({
		url: '/product/search/name',
		method: 'GET',
		params
	})
}

